<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
   PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Selenium IDE Test</title>
    <link rel="stylesheet" type="text/css" href="chrome://selenium-ide/content/jsunit/css/jsUnitStyle.css" />
		<script type="text/javascript" src="chrome://selenium-ide/content/jsunit/app/jsUnitCore.js"></script>
		<script type="text/javascript" src="chrome://selenium-ide/content/selenium-core/lib/prototype.js"></script>
		<script type="text/javascript" src="chrome://selenium-ide/content/selenium-core/scripts/selenium-browserdetect.js"></script>
		<script type="text/javascript" src="chrome://selenium-ide/content/selenium-core/scripts/atoms.js"/></script>
		<script type="text/javascript" src="chrome://selenium-ide/content/selenium-core/scripts/htmlutils.js"></script>
		<script type="text/javascript" src="chrome://selenium-ide/content/selenium-core/scripts/ui-element.js"></script>
		<script type="text/javascript" src="chrome://selenium-ide/content/selenium-core/scripts/selenium-browserbot.js"></script>
		<script type="text/javascript" src="chrome://selenium-ide/content/selenium-core/scripts/selenium-logging.js"></script>
		<script type="text/javascript" src="chrome://selenium-ide/content/preferences.js"></script>
		<script type="text/javascript" src="chrome://selenium-ide/content/tools.js"></script>
		<script type="text/javascript" src="chrome://selenium-ide/content/locatorBuilders.js"></script>
		<script type="text/javascript">
function setUp() {
	this.builders = new LocatorBuilders(window);
}

function testHrefXPathLocator() {
	var yahoo = document.getElementById("test2").getElementsByTagName("a")[1];
  assertNotNull(yahoo);
	assertLocator("//x:a[@href='http://www.yahoo.com/']", builders.buildWith('xpath:href', yahoo), yahoo);
}

function assertLocator(expected, locator, element) {
	assertEquals(expected, locator);
	assertEquals(element, builders.pageBot().findElement(locator));
}

</script>
  </head>
  <body>
		<div id="test2">
			<div>
				<a href="http://www.google.com/">
          Google
        </a>
			</div>
			<div>
				<a href="http://www.yahoo.com/">
					Yahoo
				</a>
			</div>
    </div>
  </body>
</html>
